package com.boss.salary.dao;

import com.boss.framework.dto.PaginationDTO;
import com.boss.salary.entity.SalaryHistory;
import com.boss.salary.entity.SalaryRental;
import com.boss.salary.vo.SalaryColumnWithStateVO;
import com.boss.salary.vo.SalaryMonthEndVO;

import java.util.List;
import java.util.Map;

public interface ISalaryHistoryDao {

    /**
     * 批量增加
     * @param salaryHistoryList
     */
    void batchSaveSalaryHistory(List<Object[]> salaryHistoryList);

    /**
     * 删除历史数据
     * @param month
     * @param agencyIds
     */
    void deleteSalaryHistory(String month, List<String> agencyIds);

    /**
     * 删除十三月工资
     */
    void deleteThirteenData();

    /**
     * 获得工资字段
     * @param id
     * @return
     */
    String getSalaryName(String id);

    /**
     * 获得应发工资  实发工资
     * @param queryParam
     * @return
     */
    List<SalaryRental> getSalary(PaginationDTO paginationDTO, Map<String, Object> queryParam, List<String> bizKeys,List<String> childrenId);

    int getSalaryNum(Map<String, Object> queryParam, List<String> bizKeys,List<String> childrenId);

    /**
     * 未月结查询分页
     * @param queryParam
     * @return
     */
    List<SalaryRental> getSalaryMonthEndPage(PaginationDTO paginationDTO, Map<String, Object> queryParam, List<String> childrenIds);

    /**
     * 未月结查询分页total
     * @param queryParam
     * @return
     */
    int getSalaryMonthEndTotal(Map<String, Object> queryParam, List<String> childrenIds);

    /**
     * 月结查询分页
     * @param queryParam
     * @return
     */
    List<SalaryRental> getSalaryMonthHistoryPage(PaginationDTO paginationDTO, Map<String, Object> queryParam, List<String> childrenIds);

    /**
     * 月结查询分页total
     * @param queryParam
     * @return
     */
    int getSalaryMonthHistoryTotal(Map<String, Object> queryParam, List<String> childrenIds);

    /**
     * 十三月工资：条件查询列表
     * @param agencyId
     * @param salaryMonth
     * @return
     */
    List<Map<String, Object>> selectSalaryHistoryPage(String agencyId,
                                                     String salaryMonth,
                                                      List<SalaryColumnWithStateVO> columnList,String mofDivCode);

    /**
     * 十三月工资：条件查询合计
     * @param agencyId
     * @param salaryMonth
     * @param columnList
     * @return
     */
    Map<String, Object> selectSalaryHistorySum(String agencyId,
                                               String salaryMonth,
                                               List<SalaryColumnWithStateVO> columnList,String mofDivCode);

    /**
     * 十三月工资：条件查询数据数量
     * @param agencyId
     * @return
     */
    int selectSalaryHistoryTotal(String agencyId);

    /**
     * 未月结导出查询
     * @param queryParam
     * @param childrenIds
     * @return
     */
    List<SalaryRental> getSalaryMonth(Map<String, Object> queryParam, List<String> childrenIds);

    /**
     * 已月结导出查询
     * @param queryParam
     * @param childrenIds
     * @return
     */
    List<SalaryRental> getSalaryMonthHistory( Map<String, Object> queryParam, List<String> childrenIds);

    /**
     * 根据人员id获取上月历史工资
     * @param personId
     * @param salaryMonth
     * @return
     */
    SalaryHistory selectHistorySalaryByPersonId(String personId, String agencyId, String salaryMonth);

    /**
     * 获取已月结历史数据
     * @param month
     * @param agencyIds
     * @return
     */
    List<SalaryMonthEndVO> getSalaryMonthHistory(String month, List<String> agencyIds);
    /**
     * 获取已月结历史数据
     * @param month
     * @param agencyIds
     * @return
     */
    List<SalaryMonthEndVO> querySalaryMonthHistory(String month, List<String> agencyIds);


}
